/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package classesEntidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ra106797
 */
@Entity
@Table(name = "GRUPOELETIVAS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Grupoeletivas.findAll", query = "SELECT g FROM Grupoeletivas g"),
    @NamedQuery(name = "Grupoeletivas.findById", query = "SELECT g FROM Grupoeletivas g WHERE g.id = :id"),
    @NamedQuery(name = "Grupoeletivas.findByNumcreditos", query = "SELECT g FROM Grupoeletivas g WHERE g.numcreditos = :numcreditos")})
public class Grupoeletivas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "NUMCREDITOS")
    private Integer numcreditos;

    public Grupoeletivas() {
    }

    public Grupoeletivas(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNumcreditos() {
        return numcreditos;
    }

    public void setNumcreditos(Integer numcreditos) {
        this.numcreditos = numcreditos;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Grupoeletivas)) {
            return false;
        }
        Grupoeletivas other = (Grupoeletivas) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "classesEntidades.Grupoeletivas[ id=" + id + " ]";
    }
    
}
